﻿namespace Microsoft.VisualStudio.TextTemplating.CommandLine
{
    using System;

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, AllowMultiple=true)]
    internal sealed class OptionAttribute : Attribute
    {
        private Type collectionType;
        private string defaultValue;
        private string description;
        private bool isFinalOption;
        private bool isMultipleValue;
        private string name;
        private OptionValueType valueType;

        public OptionAttribute(string name, OptionValueType valueType)
        {
            this.name = name;
            this.valueType = valueType;
        }

        public Type CollectionType
        {
            get
            {
                return this.collectionType;
            }
            set
            {
                this.collectionType = value;
            }
        }

        public string DefaultValue
        {
            get
            {
                return this.defaultValue;
            }
            set
            {
                this.defaultValue = value;
            }
        }

        public string Description
        {
            get
            {
                return this.description;
            }
            set
            {
                this.description = value;
            }
        }

        public bool IsFinalOption
        {
            get
            {
                return this.isFinalOption;
            }
            set
            {
                this.isFinalOption = value;
            }
        }

        public bool IsMultipleValue
        {
            get
            {
                return this.isMultipleValue;
            }
            set
            {
                this.isMultipleValue = value;
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        public OptionValueType ValueType
        {
            get
            {
                return this.valueType;
            }
            set
            {
                this.valueType = value;
            }
        }
    }
}

